using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace Colman.Rpg
{
    /// <summary>
    /// Raised when a user does not exist.
    /// </summary>
    [Serializable]
    public class UserDoesNotExistException : Exception
    {
        /// <summary>
        /// Creates a new instance of the <see cref="UserDoesNotExistException"/>.
        /// </summary>
        public UserDoesNotExistException(string name) 
            : base("The user '" + name + "' does not exist.")
        {
        }

        /// <summary>
        /// Creates a new instance of the <see cref="UserDoesNotExistException"/>.
        /// </summary>
        /// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
        /// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
        protected UserDoesNotExistException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}
